/* ====== SECTION 1: NEW LOGIN PAGE STYLES (Scoped) ====== */
/* These styles will ONLY apply if the body has class "login-page-active" */

.login-page-active {
    /* DEFINE CSS Variables here for the login page scope */
	--white: #e9e9e9;
	--gray: #333;
	--blue: #0367a6;
	--lightblue: #008997;
	--button-radius: 0.7rem;
	--max-width: 758px;
	--max-height: 420px; /* Increased slightly to ensure content fits */

    /* Body styles for login page */
	align-items: center;
	background: url("https://res.cloudinary.com/dci1eujqw/image/upload/v1616769558/Codepen/waldemar-brandt-aThdSdgx0YM-unsplash_cnq4sb.jpg");
	background-attachment: fixed;
	background-position: center;
	background-repeat: no-repeat;
	background-size: cover;
	display: grid;
	height: 100vh;
	place-items: center;
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
		Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
    color: var(--gray); /* Default text color for login page using its own var */
}

.login-page-active .form__title {
	font-weight: 300;
	margin: 0;
	margin-bottom: 1.25rem;
    color: var(--blue);
}

.login-page-active .link {
	color: var(--gray);
	font-size: 0.9rem;
	margin: 1.25rem 0;
	text-decoration: none;
}

.login-page-active .container {
	background-color: var(--white);
	border-radius: var(--button-radius);
	box-shadow: 0 0.9rem 1.7rem rgba(0, 0, 0, 0.25),
		0 0.7rem 0.7rem rgba(0, 0, 0, 0.22);
	height: var(--max-height); /* Uses variable defined in .login-page-active */
	max-width: var(--max-width); /* Uses variable defined in .login-page-active */
	overflow: hidden;
	position: relative;
	width: 100%; /* Will be constrained by max-width via the grid centering */
}

.login-page-active .container__form {
	height: 100%;
	position: absolute;
	top: 0;
	transition: all 0.6s ease-in-out;
}

.login-page-active .container--signin {
	left: 0;
	width: 50%;
	z-index: 2;
    opacity: 1; /* Explicitly set opacity to 1 for initial state */
}

/* This rule applies when .right-panel-active is added to .container on login page */
.login-page-active .container.right-panel-active .container--signin {
    transform: translateX(100%);
    opacity: 0;
}

.login-page-active .container--signup {
	left: 0;
	opacity: 0; /* Initially hidden */
	width: 50%;
	z-index: 1;
}

.login-page-active .container.right-panel-active .container--signup {
	animation: login-page-show 0.6s;
	opacity: 1;
	transform: translateX(100%);
	z-index: 5;
}

.login-page-active .container__overlay {
	height: 100%;
	left: 50%;
	overflow: hidden;
	position: absolute;
	top: 0;
	transition: transform 0.6s ease-in-out;
	width: 50%;
	z-index: 100;
}

.login-page-active .container.right-panel-active .container__overlay {
	transform: translateX(-100%);
}

.login-page-active .overlay {
	background-color: var(--lightblue);
	background: url("1.png");
	background-attachment: fixed;
	background-position: center;
	background-repeat: no-repeat;
	background-size: cover;
	height: 100%;
	left: -100%;
	position: relative;
	transform: translateX(0);
	transition: transform 0.6s ease-in-out;
	width: 200%;
}

.login-page-active .container.right-panel-active .overlay {
	transform: translateX(50%);
}

.login-page-active .overlay__panel {
	align-items: center;
	display: flex;
	flex-direction: column;
	height: 100%;
	justify-content: center;
	position: absolute;
	text-align: center;
	top: 0;
	transform: translateX(0);
	transition: transform 0.6s ease-in-out;
	width: 50%;
    padding: 0 40px;
}

.login-page-active .overlay__panel h1 {
    font-weight: bold;
    margin:0;
    color: var(--white);
}
.login-page-active .overlay__panel p {
    font-size: 14px;
    font-weight: 100;
    line-height: 20px;
    letter-spacing: 0.5px;
    margin: 20px 0 30px;
    color: var(--white);
}


.login-page-active .overlay--left {
	transform: translateX(-20%);
}

.login-page-active .container.right-panel-active .overlay--left {
	transform: translateX(0);
}

.login-page-active .overlay--right {
	right: 0;
	transform: translateX(0);
}

.login-page-active .container.right-panel-active .overlay--right {
	transform: translateX(20%);
}

.login-page-active .btn {
	background-color: var(--blue);
	background-image: linear-gradient(90deg, var(--blue) 0%, var(--lightblue) 74%);
	border-radius: 20px;
	border: 1px solid var(--blue);
	color: var(--white);
	cursor: pointer;
	font-size: 1.0rem;
	font-weight: bold;
	letter-spacing: 0.1rem;
	padding: 0.9rem 4rem;
	text-transform: uppercase;
	transition: transform 80ms ease-in;
    margin-right: 0;
}
.login-page-active .btn:last-child {
    margin-right: 0;
}


.login-page-active .form > .btn {
	margin-top: 1.25rem;
}



.login-page-active .btn:active {
	transform: scale(0.95);
}

.login-page-active .btn:focus {
	outline: none;
}

.login-page-active .form {
	background-color: var(--white);
	display: flex;
	align-items: center;
	justify-content: center;
	flex-direction: column;
	padding: 0 3rem;
	height: 100%;
	text-align: center;
}

.login-page-active .input {
	background-color: #eee;
	border: none;
    border-radius: var(--button-radius);
	padding: 0.9rem 0.9rem;
	margin: 0.5rem 0;
	width: 100%;
    box-sizing: border-box;
    font-size: 1rem; /* Explicit font size for inputs */
}
.login-page-active .input:focus {
    outline: 2px solid var(--blue);
}

.login-page-active .form-message {
    color: #dc3545;
    font-size: 0.85em;
    margin-top: 10px;
    min-height: 1.2em;
    text-align: center;
}

@keyframes login-page-show {
	0%,
	49.99% {
		opacity: 0;
		z-index: 1;
	}

	50%,
	100% {
		opacity: 1;
		z-index: 5;
	}
}


/* ====== SECTION 2: YOUR ORIGINAL GENERAL STYLES ====== */
/* These styles apply globally unless overridden by more specific rules */

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f7f6;
    color: #333;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.hidden {
    display: none !important;
}

.error-message {
    color: #d9534f;
    margin-top: 10px;
    font-size: 0.9em;
}

.success-message {
    color: #5cb85c;
    margin-top: 10px;
    font-size: 0.9em;
}

.notification-area {
    padding: 10px;
    background-color: #e0f2f7;
    border: 1px solid #b3e5fc;
    color: #01579b;
    margin-bottom: 20px;
    border-radius: 4px;
    font-size: 0.9em;
}

.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #555;
}

.input-group input[type="text"],
.input-group input[type="password"],
.input-group input[type="email"],
.input-group input[type="date"],
.input-group select,
.input-group textarea,
.input-group input[type="file"] {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 1em;
    box-sizing: border-box;
}


/* ====== SECTION 3: YOUR ORIGINAL DASHBOARD STYLES ====== */

.dashboard-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

.dashboard-header {
    background-color: #007bff;
    color: white;
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.dashboard-header h1 {
    margin: 0;
    font-size: 1.8em;
}

.dashboard-header .header-right span {
    margin-right: 15px;
    font-size: 1.1em;
}

.dashboard-sidebar {
    width: 250px;
    background-color: #2c3e50;
    color: #ecf0f1;
    padding-top: 20px;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
    position: fixed;
    height: calc(100vh - 67px);
    top: 67px;
    left: 0;
    overflow-y: auto;
}

.dashboard-sidebar nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.dashboard-sidebar nav ul li a {
    display: block;
    padding: 15px 25px;
    color: #ecf0f1;
    text-decoration: none;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.dashboard-sidebar nav ul li a:hover,
.dashboard-sidebar nav ul li a.active {
    background-color: #34495e;
    color: #fff;
    border-left: 5px solid #007bff;
    padding-left: 20px;
}

.dashboard-content {
    margin-left: 250px;
    padding: 30px;
    flex-grow: 1;
    overflow-y: auto;
}

.content-section {
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 30px;
}

.content-section h2, .content-section h3 {
    color: #007bff;
    margin-top: 0;
    margin-bottom: 25px;
}

.btn { /* General .btn for dashboard */
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
    transition: background-color 0.3s ease, opacity 0.3s ease;
    margin-right: 10px;
}

.btn:last-child {
    margin-right: 0;
}

.btn-primary {
    background-color: #007bff;
    color: white;
}
.btn-primary:hover {
    background-color: #0056b3;
}
.btn-success {
    background-color: #28a745;
    color: white;
}
.btn-success:hover {
    background-color: #218838;
}
.btn-danger {
    background-color: #dc3545;
    color: white;
}
.btn-danger:hover {
    background-color: #c82333;
}
.btn-secondary {
    background-color: #6c757d;
    color: white;
}
.btn-secondary:hover {
    background-color: #5a6268;
}
.btn-info {
    background-color: #17a2b8;
    color: white;
}
.btn-info:hover {
    background-color: #138496;
}

.content-section form {
    margin-top: 20px;
}

.content-section .input-group {
    margin-bottom: 15px;
}

.content-section .input-group label {
    margin-bottom: 5px;
}

.content-section .input-group input[type="text"],
.content-section .input-group input[type="email"],
.content-section .input-group input[type="password"],
.content-section .input-group input[type="date"],
.content-section .input-group select,
.content-section .input-group textarea,
.content-section .input-group input[type="file"] {
    width: calc(100% - 22px);
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.95em;
}

.content-section .input-group input[type="checkbox"],
.content-section .input-group input[type="radio"] {
    margin-right: 5px;
}

.attachment-upload small {
    display: block;
    margin-top: 5px;
    color: #666;
    font-size: 0.85em;
}

.outcome-type-selector {
    margin-bottom: 25px;
    padding: 15px;
    background-color: #e9f5fd;
    border: 1px solid #cce7fa;
    border-radius: 5px;
}

.filter-controls {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.filter-controls select,
.filter-controls input[type="text"] {
    flex: 1;
    min-width: 150px;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.data-table th, .data-table td {
    border: 1px solid #ddd;
    padding: 12px;
    text-align: left;
    font-size: 0.9em;
}

.data-table th {
    background-color: #f2f2f2;
    font-weight: bold;
    color: #555;
}

.data-table tr:nth-child(even) {
    background-color: #f9f9f9;
}

.data-table tr:hover {
    background-color: #f1f1f1;
}

.data-table .actions button {
    margin-right: 5px;
    padding: 6px 12px;
    font-size: 0.85em;
}

.outcome-field-group {
    border: 1px solid #e0e0e0;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 5px;
    background-color: #fbfbfb;
}
.outcome-field-group h4 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #007bff;
}

.item-list-container {
    border: 1px dashed #ccc;
    padding: 15px;
    margin-bottom: 15px;
    background-color: #fdfdfd;
    border-radius: 4px;
}
.item-list-container h4 {
    margin-top: 0;
    margin-bottom: 10px;
}
.item-list-entry {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    background-color: #eef;
    padding: 8px 12px;
    border-radius: 4px;
}
.item-list-entry input[type="text"],
.item-list-entry select {
    flex-grow: 1;
}
.item-list-entry .remove-btn {
    background-color: #dc3545;
    color: white;
    border: none;
    padding: 5px 8px;
    border-radius: 4px;
    cursor: pointer;
}
.add-item-btn {
    background-color: #28a745;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9em;
    margin-top: 10px;
}

.batch-import {
    border-top: 1px solid #eee;
    padding-top: 20px;
    margin-top: 30px;
}
.batch-import input[type="file"] {
    margin-bottom: 10px;
}

